package com.yxjx.duoxue.datamodel;

import java.io.Serializable;

import com.yxjx.duoxue.network.MsgCode;

public class ResponseObject implements Serializable {
	// 如果code为－10,则返回的错误消息取msg的内容
	protected int code;
	protected String msg;
	
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	public ResponseObject(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}
	
	public boolean isOk() {
		return code == MsgCode.SUCCESS;
	}
	
	
}
